﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows.Data;
using Microsoft.TeamFoundation.WorkItemTracking.Client;

namespace WIAssistant
{
    [ValueConversion(typeof(double), typeof(String))]
    public class DictionaryKeyStringToValueBoolConverter : IValueConverter
    {
        public object Convert(object value, Type targetType, object parameter,System.Globalization.CultureInfo culture)
        {
            Dictionary<String, bool> dictionary = (Dictionary<String, bool>) value;
            string dictionaryKey = (string) parameter;
            bool dictionaryValue;
            dictionary.TryGetValue(dictionaryKey, out dictionaryValue);
            return dictionaryValue;
        }
        public object ConvertBack(object value, Type targetType,object parameter,System.Globalization.CultureInfo culture)
        {
            return false;
        }

    }
}